﻿@model DauGiaApp.Models.DauGia
@{
    ViewBag.Title = "DanhGia";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<link href="@Url.Content("~/Content/chitietsanpham.css")" rel="stylesheet" type="text/css" />


<h2 class="title_hot">DanhGia</h2>
<div class="item_chitietsanpham">    
    <div id = "hinhanh">        
        <span id="anhsanpham">
            <a href="../../Content/images/@Model.SanPham.LayAnhDaiDien()" >
              <img src="../../Content/images/@Model.SanPham.LayAnhDaiDien()" alt="anh sp"/>
            </a>	    
        </span> 
        
        <span id = "chitietsanpham">
            <!-- thông tin chi tiết -->
            <h1 id="nguoidang">Người đăng : @Model.TaiKhoan.TenTaiKhoan</h1>
            <h1 id= "gia">Giá : @Model.SanPham.GiaHienTai VNĐ</h1>
            <h1 id "ngaydang">Ngày đăng : @Model.SanPham.NgayDang.ToString()</h1>
            <h1 id "tinhtrang">Tình trạng : @Model.SanPham.TinhTrangSanPham.TenTinhTrangSanPham</h1>        
            
        </span>
        <div id = "dsanh">
        <!-- danh sách ảnh -->            
                                
            @foreach (string item in Model.SanPham.LayDSAnh())
            {            
		        <li>
                <a href="../../Uploads/@item"><img src="../../Uploads/@item" alt="@item" /></a>
                </li>
            }                
            </ul>                
        </div>                
    </div>
    <div id = "motasanpham">
        <h1 id = "tensanpam"> @Model.SanPham.LoaiSanPham.TenLoaiSanPham @Model.SanPham.TenSanPham</h1>
        <div id="mo-ta-sp">@Html.Raw(Model.SanPham.MoTaSanPham)</div>
    </div>    
    <h2 class="title_hot">DanhGia</h2>
    <h2>@Model.DanhGia</h2>
    @using (Html.BeginForm("DangDanhGia","DauGia")) {    
        <div id="khungdanhgia">
            <textarea id="noidungdanhgia" name="noidung"> Đánh giá ....
            </textarea>
            <input type="hidden" name="id" value= @Model.MaDauGia />
            <input type="submit" id="btn_danhgia" name="btn_danhgia" value="Đánh giá"/>
        </div>
    }
    
</div>
    

